home *** CD-ROM | disk | FTP | other *** search
-
-
-
- GETENV C Library Procedures GETENV
-
-
-
- NNAAMMEE
- getenv, setenv, unsetenv - manipulate environmental vari-
- ables
-
- SSYYNNOOPPSSIISS
- cchhaarr **ggeetteennvv((nnaammee))
- cchhaarr **nnaammee;;
-
- vvooiidd sseetteennvv((nnaammee,, vvaalluuee))
- cchhaarr **nnaammee,, **vvaalluuee;;
-
- vvooiidd uunnsseetteennvv((nnaammee))
- cchhaarr **nnaammee;;
-
- DDEESSCCRRIIPPTTIIOONN
- _G_e_t_e_n_v searches the environment list (see _e_n_v_i_r_o_n(7)) for a
- string of the form _n_a_m_e==_v_a_l_u_e and returns a pointer to the
- string _v_a_l_u_e if such a string is present, and 0 (NULL) if it
- is not.
-
- _S_e_t_e_n_v searches the environment list as _g_e_t_e_n_v does; if the
- string _n_a_m_e is not found, a string of the form _n_a_m_e==_v_a_l_u_e is
- added to the environment. If it is found, its value is
- changed to _v_a_l_u_e.
-
- _U_n_s_e_t_e_n_v removes all occurrences of the string _n_a_m_e from the
- environment. There is no library provision for completely
- removing the current environment. It is suggested that the
- following code be used to do so.
-
- static char *envinit[1];
- extern char **environ;
- environ = envinit;
-
- SSEEEE AALLSSOO
- csh(1), sh(1), execve(2), environ(7)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 March 20, 1987 1
-
-
-
-